﻿namespace MicroMq.Services
{
    public class WorkItem
    {
        public string Topic { get; set; }
        public byte[] Bytes { get; set; }

        private int RetryCount;
        public WorkItem(string topic, byte[] bytes, int retryCount)
        {
            this.Topic = topic;
            this.Bytes = bytes;
            this.RetryCount = retryCount;
        }

        public bool Reduce()
        {
            return --RetryCount >= 0;
        }
    }


}
